home *** CD-ROM | disk | FTP | other *** search
- <BEEBE.TEX.DVI>00REVHST.TXT.72, 20-May-87 10:09:14, Edit by BEEBE
- ========================================================================
-
- [20-May-87] from Brendan Mackay (munnari!anucsd.oz!bdm@seismo.CSS.GOV)
- In openfont.h, the virtual font section can erroneously
- reference a null fontfp; change
- if (virt_font)
- to
- if (virt_font && (fontfp != (FILE*)NULL))
-
- and
- if (virt_font && virt_save[fileno(fp)].base != (char *)NULL)
- to
- if (virt_font && (fp != (FILE*)NULL) &&
- (virt_save[fileno(fp)].base != (char *)NULL))
-
- [15-May-87] On line 127 of execute.c in the IBM PC-specific MAKE
- utility, change
- *str >= 'A' && *str <= 'A' ||
- to
- *str >= 'A' && *str <= 'Z' ||
-
- [29-Apr-87] from Brendan Mackay (munnari!anucsd.oz!bdm@seismo.CSS.GOV)
- In machdefs.h, change
- #define REWIND(fp) fseek(fp,0L,0)
- to
- #define REWIND(fp) FSEEK(fp,0L,0)
- This is not necessary for the family as distributed, but
- Brendan has implemented the virtual font changes
- necessary for VAX VMS; they should be incorporated in a
- future release.
-
- [29-Apr-87] from Brendan Mackay (munnari!anucsd.oz!bdm@seismo.CSS.GOV)
- The code for vms_read() [in vaxvms.c] has problems. One
- is that you don't test for end of file. The other is
- that there is a bug in the C library which prevents you
- asking for more than 65535 bytes at a time. It is
- documented that no more than 65535 bytes will be
- returned, but not that you can't ask for more. If you
- do, it reduces your request mod 65536! Here's a
- replacement:
-
- /**********************************************************************/
- /*-->READ*/
- int
- READ(file_desc,buffer,nbytes)
- register int file_desc;
- register char *buffer;
- register int nbytes;
- {
- register int ngot;
- register int left;
-
- for (left = nbytes; left > 0; /* NOOP */)
- {
- ngot = read(file_desc,buffer,(left > 65024 ? 65024 : left));
- if (ngot < 0)
- return (-1); /* error occurred */
- if (ngot == 0) /* eof occurred */
- return(nbytes-left);
- buffer += ngot;
- left -= ngot;
- }
- return(nbytes-left);
- }
-
- [15-Apr-87] Completed version 2.07 for general release.
-
- [04-Apr-87] to
- [15-Apr-87]
- Changed texidx.c to check for special characters
- in generated \initial{} commands and suitably
- protect them.
-
- Changed dviinit.h to try to open output file and
- log file in current directory if open in the
- directory of the .dvi file fails (presumably
- because no write access to that directory).
-
- Adapted loadbmap() code from dvican.c to
- dvijep.c, and added function declaration in
- gblprocs.h, finally removing the limitation
- dvijep had for large font characters.
-
- Rearranged some struct members in gblvars.h to
- ease debugging.
-
- Added check in openfont.h for null pfontptr.
-
- Updated Makefile's and added ones for KCC, PCC,
- and VMS.
-
- Rewrote 00arit.c to test short, int, and long
- integer arithmetic.
-
- Changed version numbers in dvi*.c from 2.06 to
- 2.07.
-
- Split bopact.h (beginning of page action) out of
- eopact.h.
-
- Rewrote eopact.h to reflect new instant keyboard
- response and better control over page
- positioning.
-
- Increased value of BIGBGCHAR in dvibit.c to allow
- large characters to be sent as fonts, rather than
- bitmaps.
-
- There seems to be a bug in BitGraph Version 3.10
- which causes characters to be overwritten at the
- right margin when the actual screen width is
- used. Reduced value of XSIZE in dvibit.c to fix
- the problem.
-
- Decreased YSIZE in dvibit.c to make space for
- larger command and status area at top of screen.
-
- Added keybrd.c and keydef.h to handle keyboard
- input. keybrd.c was a major effort (900 lines of
- code and comments), but now nicely hides the
- ugliness of instant keyboard input on all the
- operating systems presently supported in the DVI
- family.
-
- Removed references to Berkeley Unix sgtty.h file
- and tty structures in dvibit.c and gblvars.h; no
- longer needed since keybrd.c hides those details.
-
- Use JSok instead of JSerr in f20open.h to allow
- jsys() calls to work for both KCC-20 and PCC-20.
-
- Modified character screen clipping decision in
- setchar() in dvibit.c.
-
- Changed raster-op code from 3 to 9 in BBNDPD
- command in setchar() in dvibit.c so that display
- is correct with both inverse video and normal
- video.
-
- Split reldfont.h out of readfont.h to support
- font unloading needed for dvibit zoom commands.
-
- Added #include "reldfont.h" to dvi*.c.
-
- Removed conditionals around #include statements
- and put them in the #include'd file instead; this
- reduces the number of changes needed in the
- dvi*.c files as new implementations are made.
- This affects f20open.h, strchr.h, and strrchr.h.
-
-
- Added KCC support changes to dvihead.h, fatal.h,
- f20open.h, gblprocs.h, machdefs.h, main.h,
- strchr.h, strrchr.h, texid3.h.
-
- Added terminal backslash to lines in multi-line
- macro invocations in dvijep.c and getbmap.h (KCC
- restriction).
-
- Added new function declarations to gblprocs.h.
-
- Changed dimension of message[] in gblvars.h from
- MAXSTR to MAXMSG; it needs to be larger than
- MAXSTR in order to hold error messages containing
- strings of size MAXSTR. MAXMSG is defined in
- gendefs.h.
-
- Updated lptops.c and lw78.c for KCC.
-
- Added conditionals to lptops.c to initialize all
- unset symbols to 0 (KCC requires this), and
- default to OS_UNIX if no host is defined.
-
- Added KCC_20 and DECLA75 symbols to machdefs.h.
-
- Changed major DVI command loop in prtpage.h to
- call kbinput(), bopact(), and eopact() for BBN
- BitGraph, and changed full screen erase to
- partial erase to preserve command/status window.
-
- In texid3.c, changed short name readln to rdline
- to remove conflict with KCC library.
-
- Added GETCHAR routine to vaxvms.c; this is not
- needed by the DVI driver family, but the idea was
- used in keybrd.c.
-
- [01-Apr-87] Begin work on Version 2.07
- General work: major changes to support new KCC-20
- compiler, substantially enhance DVIBIT, and add
- DVIL75.
-
- ========================================================================
- [01-Apr-87]
- End work on Version 2.06:
-
- [04-Mar-87]
- Added declaration of errno in dvihead.h for BSD41
- and BSD42; they don't have it in errno.h.
-
- [04-Mar-87]
- Added test for null file pointer before calls to
- fclose() in abortrun.h and dviterm.h; failure to
- do so causes core dumps when exit() is entered in
- 4.1 and 4.2BSD Unix.
-
- [27-Feb-87]
- option.h did not support negative magnifications,
- like -m-0.5 and -m-1, which was advertized in the
- documentation, dviman.ltx. Code has now been
- added to handle that case. Without the fix, it
- is of course still possible to get any
- magnification value, since e.g. if -m1500 is the
- default on a 300 dpi printer, then -m-0.5 is
- equivalent to -m1369 (1369 = 1500/(1.2**(-0.5))).
-
- [26-Feb-87]
- In dispchar.h, change the line
- rightones[HOST_WORD_SIZE - 1 - bits_to_next] &
- to
- rightones[bits_to_next] &
-
- This code is not active for non 32-bit machines,
- or the IBM PC, and the local 32-bit Unix machines
- running the driver family have been using only
- the laser printer members, so the bug was not
- caught until we actually tried DVIPRX output
- under VAX VMS. The effect it has is that large
- vertical white streaks appear in the output
- bitmap; dispchar() is used by all the
- low-resolution dot matrix printers.
-
- [25-Feb-87]
- Added code to prtbmap() in dviprx.c to print
- bitmap in hexadecimal when (debug_code & 1) is
- non-zero.
-
- [21-Feb-87]
- In prtpage.h, corrected "\special" to
- "\\special"; this error was caught by the KCC-20
- compiler.
-
- [10-Feb-87]
- Yesterday I discovered that VAX VMS 4.4 printf()
- wipes out the stack and kills the process if a
- long string is printed. This turns out to be the
- case in outline() in dvitos.c; the code has been
- modified to use fputs() there instead.
-
- [10-Feb-87]
- Several debugging sessions on VAX VMS stepping
- through the call chain fflush() -> _flsbuf() ->
- _flsbuf_record() -> write_record() ->
- write_buffer() -> write_imbed() -> write_output()
- ->signal() -> c$$translate() have made it clear
- that the simple scheme in dvi*.c and lptops.c of
- checking for a non-zero return value from
- fflush() or ferror() is an unreliable way to
- conclude a legitimate error (specifically, disk
- storage exhausted) exists. Consequently, these
- routines have been modified to call clearerr() at
- the beginning of loadchar() and prtbmap(), then
- to use a macro DISKFULL() to test for the error
- condition. DISKFULL() is defined in machdefs.h,
- and errno.h is now included by dvihead.h. This
- regrettably introduces small changes in a number
- of routines, but no other clean way of doing the
- job appeared to be feasible.
-
- [02-Feb-87]
- Changed "pagecollation on" to "pagecollation off"
- in dviimp.c. With version 3.3 of the Imagen
- Image Processor software, there seems to be a bug
- in that "pagecollation on" causes page reversal.
- I have reported this to Imagen.
-
- [20-Jan-87]
- Replaced page_xxx[] arguments to sscanf() in
- option.h with int temporaries p1,p2,p3; the
- page_xxx[] values are of type INT16 which does
- not match the %d format items. The use of
- sscanf() in fontsub() is okay. The one in
- special() in dvialw.c has the type COORDINATE for
- the variables llx, lly, urx, ury; the type has
- been changed to int.
-
- This bug surfaced on an HP Unix system with the
- FOCUS chip; it is disguised on the DEC-20 by
- virtue of short, int, and long all being one word
- long, and on the VAX and Intel architectures
- which address these values by their low-order,
- rather than high-order, byte (i.e. little Endian
- order).
-
- [16-Jan-87]
- Corrected error in tosprx.c which resulted in
- loss of first page, and added test to avoid
- unnecessary OR'ing zero bits into bitmap.
-
- [10-Jan-86]
- In machdefs.h, reset MAXOPEN to NFILES-6 or less,
- where NFILES is the limit on the number of open
- files set in stdio.h. It was previously
- NFILES-5, which can cause an abort with a message
- "unable to open error log file" because all file
- handles are in use.
-
- [07-Jan-86]
- Finished preliminary release of DVICAN for the
- Canon LBP-8 A2 laser printer. At present, this
- is forced to send bitmaps for every single
- typeset character, since the downloaded font
- mechanism does not work reliably. Canon's
- documentation is abysmal, and after tearing my
- hair out staring at hex dumps of the output of
- many test files, I received a hex dump of a file
- from a site in Holland using a driver obtained
- from Japan; to my surprise, they did not use the
- download mechanism, just bitmaps, so I expect
- they hit the same problems I did. I intend to
- try to find out more detailed information from
- the local Canon dealer--perhaps there is
- something magic missing. It is indeed suspicious
- however, when TeX input "ABABABABAB" produces
- "ABA A A A ", and "A SHORT STORY" produces "A SH
- RT T Y"--characters apparently randomly (though
- reproducibly) dropped from the printed page.
-
- The penalty for sending bitmaps instead of fonts
- is severe--on a 15-page test file, it took 10.8
- times as many bytes/page as DVIJEP, averaging
- nearly 95K characters/page, for a throughput of
- one printed page every 2 to 4 minutes, instead of
- the 4/minute available from the LaserJet Plus.
-
- [20-Dec-86]
- Updated DVIBIT, fixing several things that had
- been broken by changes which could not be tested
- earlier, and improving the interactive interface.
- End-of-page action in prtpage.h has been expanded
- and moved out to eopact.h. Warning messages are
- suppressed for DVIBIT when quiet mode (-q) is
- selected to avoid needlessly trashing the screen.
-
- Default magnification for low-resolution devices
- changed from 579 (magstep -3 in 200dpi family) to
- 603 (magstep -5 in 300dpi family).
-
- Added run-time selectable virtual font support
- for performance improvement, particular on
- networked file systems where the overhead of
- reading small packets becomes unacceptably large.
- With .PK fonts, most font files for normal sized
- text are 4K to 8K bytes, and for SliTeX text, 15K
- to 20K bytes. With up to 15 fonts open, this
- probably requires less than 200K bytes of memory,
- which is available for the non-bitmapped drivers
- even on my IBM PC.
-
- [15-Dec-86]
- Reorganized machdefs.h to group each set of
- machine-specific changes inside one conditional
- for that machine. Removed #undef's--if the
- compiler warns of redefinitions, that is useful
- feedback that the right set has been chosen.
-
- Completed port to VAX VMS. VMS C has an
- incomplete library and faulty implementations of
- fseek(), ftell(), and ungetc(). To get around
- these, macros FSEEK, FTELL, and UNGETC have been
- used throughout the code, and machdefs.h will
- define them to point to special versions found in
- vaxvms.c in the OS_VAXVMS conditional section.
- The VMS debugger, particular in screen mode where
- the source code, output, and debug input are
- displayed in three windows is excellent, though
- unnecessarily verbose. VMS C makes memory page 0
- inaccessible. This caught two instances of
- dereferencing of NULL pointers in movedown.h and
- moveover.h.
-
- Logical names for VAX VMS are chosen to match the
- Kellerman and Smith TeX implementation. DVI and
- font file formats are assumed to be fixed binary;
- stream files would be better (since fseek() and
- ftell() work properly for them, and padding to
- block boundaries is unnecessary), but their use
- would require rewriting change files for all the
- TeXware.
-
-
- [05-Dec-86]
- In dviinit.h (TOPS-20 and VMS only), fix bug
- causing referencing of *(NULL + 1). Change
- "if (isdigit(*(tcp1+1)))"
- to
- "if ((tcp1 != (char*)NULL) && isdigit(*(tcp1+1)))"
-
- [15-Nov-86]
- In fontfile.h (bug found Unix conditional code,
- but could happen if other machines were added),
- in the loop beginning
-
- m = 0; /* index in filelist[] */
- for (k = 0; k < MAXFORMATS; ++k) /* loop over possible file types */
- {
- *filelist[k] = '\0'; /* Initially, all filenames are empty */
-
- the filelist[] entry is cleared on each loop
- iteration, but in the Unix code section, it is
- actually advancing over two entries at a time.
- The initialization must be moved out into a
- separate new loop preceding the old one:
-
- for (k = 0; k < MAXFORMATS; ++k)
- *filelist[k] = '\0'; /* Initially, all filenames are empty */
-
-
- [13-Nov-86]
- Update makefile.1, makefile.2, makefile.msc for
- IBM PC.
-
- [13-Nov-86]
- Add extra library .h file #include's in dvihead.h
- for IBM PC MICROSOFT C library function
- declarations.
-
- [12-Nov-86]
- Change malloc to MALLOC in getbmap.h, loadchar.h,
- machdefs.h, and readfont.h; for IBM PC Microsoft,
- this is defined to use calloc() instead of
- malloc() in machdefs.h. This seems to remove a
- long-standing bug of the driver hanging the
- machine after printing the last page, presumably
- while in the free() calls in dviterm(). I made
- extensive tests on the DEC-20 to try to reproduce
- this bug, by using DDT to introduce code that
- initializes the free stack area and malloc()'d
- memory to values which would cause integer
- overflow if used as integers, and would cause
- illegal memory references if used as pointers.
- No failure could be precipitated by this. On the
- IBM PC, the symptom was that the driver would run
- on a freshly-booted machine (booting sets memory
- to a specific non-zero bit pattern), but if other
- programs had been run, it would sometimes hang.
- I found that by using the debugger to
- preinitialize memory to a fixed bit pattern
- before running DVIJEP, I could repeatedly run
- DVIJEP all night long. The change from malloc()
- to calloc(), which zeroes the returned memory,
- permitted DVIJEP to run successfully 85 times in
- a row; when I subsequently reran the old version,
- it hung the PC. Recent netmail has carried
- numerous discussions of irregularities of both
- Lattice and Microsoft C malloc()'s; this may be
- one more manifestation.
- [31-Oct-86]
- Fixed a dumb typo in dvialw.c and dvijep.c; in
- setstr(), change
- (void)fprintf(stderr,isprint(c) ? "%c" : "\\%03o",c);
- to
- (void)fprintf(stderr,isprint(str[k]) ? "%c" : "\\%03o",str[k]);
-
- [24-Oct-86]
- Whoops! Somehow, warning() lost its code to
- write its message on stderr as well as the log
- file. At the end, add the lines
-
- NEWLINE(stderr);
-
- #if (OS_TOPS20 | OS_VAXVMS)
- (void)putc('%',stderr); /* percent at start of line */
- #endif
-
- (void)fputs(msg,stderr);
- NEWLINE(stderr);
- if (g_logname[0])
- {
- (void)fprintf(stderr,
- "Current TeX page counters: [%s]",tctos());
- NEWLINE(stderr);
- }
-
- The check of g_logname[0] suppresses an attempt
- to supply page counters when no .DVI file has yet
- been opened.
-
- [24-Oct-86]
- If an invalid option is detected in option(),
- then warning() and/or fatal() will be called.
- However, there is not yet a file name available
- for a log file, and g_dolog is initially TRUE, so
- both warning() and fatal() will abort because the
- log file cannot be opened. Change the "if
- (g_dolog ...) statements in fatal.h and warning.h
- to include the condition "&& g_logname[0]".
- Since C requires external variables to be
- initialized to zero, g_logname[0] = '\0' when
- option() is called, and no attempt will be made
- to open the log file in warning() and fatal().
-
- [21-Oct-86]
- For TOPS-20 only, set output and log file
- generation retention counts to zero, implying all
- generations will be kept. That way, if the user
- runs dvixxx for the same file, but with different
- parameters (-x and -y are good examples), the
- earlier versions will not be lost. This adds
- some new flags to machdefs.h, and some additional
- code to dviinit.h, fatal.h, and warning.h right
- after their fopen() calls. fopen(,"w+") will
- reuse an existing file, so we changed the logfile
- generation to "-1", always giving a new file.
-
- [21-Oct-86]
- In prtpage.h, inserted
- rule_height = -1; /* reset last rule parameters */
- rule_width = -1;
- before line
- str_ycp = -1;
- in POSTSCRIPT section (about line 115) of case
- BOP. I caught this when I did `dvialw foo.dvi.*'
- today-- after the first file, the PostScript
- output contained a reference to the Q macro
- before a B had been issued to define h and w, the
- previous bar dimensions.
-
- [13-Oct-86]
- Added -d32 option to cause display of all
- truncated off-page text strings. This was
- prompted by my wasting time looking for what I
- thought was a bug in setstr() with long strings.
- Changes in functions setstr() and setchar() in
- dvialw.c and dvijep.c, and setchar.h, as well as
- documentation in dviman.ltx and dviman.texinfo.
-
- [15-Sep-86]
- Added -z option for PostScript and HP LaserJet
- Plus on TOPS-20 only; this types in a command
- "DVISPOOL: dvifilename\n", permitting the user to
- define a spooler for the DVI file. This typein
- is not automatic as in TOPS-20 TeX, because it
- may interfere with batch and .mic files; however,
- the final newline is supplied, because it is
- assumed the user wanted it if the option switch
- was given. Changes in dviterm.h, gblvars.h,
- option.h, and usage.h, with new BOOLEAN global
- variable "spool_output".
-
- [15-Sep-86]
- Added page_step[] to allow printing pages in
- steps other 1, such as for duplex printing, and
- option -obeginpage:endpage:steppage; this
- required changes in dvifile.h, gblvars.h, main.h,
- option.h, and usage.h.
-
- [09-Sep-86]
- Changed checksum error message in readgf.h,
- readpk.h, and readpxl.h to output checksums in
- octal and hexadecimal as well as decimal, and
- explain why the mismatch is likely to have
- occurred.
-
- Changed debug_code to debug_code & 4 in dvijep.c,
- and updated dviman.ltx to define settings of -d#
- option for selective debug output.
-
- Added DEBUG_OPEN() calls to dvialw.c, dviinit.h,
- fatal.h, fontsub.h, openfont.h, and warning.h,
- and definition of DEBUG_OPEN() to gendefs.h.
-
- Delete doubled word in comment in charpk.h.
-
- Insert typecast in fillrect.h:
- *p = (UNSIGN32)ONES.
-
- Insert typecast in dvibit.c:
- tcharptr->istoobig = ((int)(tcharptr->hp*
- ((tcharptr->wp+15) >> 4)) >= BIGBGCHAR);
-
- Change macro argument c to ch in dvijep.c
- (Microsoft C version 4.0 otherwise thinks that
- the c in the format specification is to be
- expanded too):
- #define SETCHARCODE(fontnumber,ch) {\
- if (fontnumber)\
- (void)fprintf(plotfp,"\033*c%dd%dE",fontnumber,MAPCHAR(ch));\
- else\
- (void)fprintf(plotfp,"\033*cd%dE",MAPCHAR(ch));\
- }
-
-
- [04-Sep-86]
- Fixed handling of -o-# in option.h; I forgot to
- check for signs in skipping the number.
-
- [28-Aug-86]
- Wrote errshow.c; it is a filter which merges the
- error message file output by Microsoft C with a
- copy of the source line causing the error
- message.
-
- [28-Aug-86]
- Minor changes for type matching. Added typecasts
- in chargf.h, charpk.h, dvialw.c, and dvijep.c.
- Changed type declarations of m_begin, m_end,
- m_step in dvitype.h, of k in fontfile.h, and of
- fontfile() arguments in gblprocs.h. Added code
- for IBM_PC_MICROSOFT to include stdlib.h and
- string.h in main.h. Version 3.0 of Microsoft C
- has a number of errors and inconsistencies in the
- library file type declarations for stdio.h and
- string.h. I fixed declarations and use of
- putc(), putchar(), fileno(), _flsbuf(), thereby
- eliminating "strong type mismatch" errors on
- every instance of use of these functions.
- Declarations of argument types for strxxx() have
- int instead of char, and unsigned int instead of
- int, for strchr(), strlen(), strrchr(),
- strncpy(), strncat(), and strncmp(), which is at
- variance with Kernighan & Ritchie, and with
- Harbison & Steele, so use of these still gives
- type mismatch errors. I am not fixing the
- library file declarations pending seeing what
- Version 4.0 has to offer, and what the ANSI C
- Standard committee does with them.
-
- [21-Aug-86]
- Add -e option in option.h for run-time
- command-line definition of ``environment''
- variables, and move initialization of xx_index
- out of initglob() into dvifile(). This was
- prompted by the use of Unix server invocations of
- the drivers through calls to ``system("dvixxx
- filename")''. Such a call creates a new shell
- which, although it inherits the caller's
- environment, may in fact require different
- environment variables, especially for things like
- FONTLIST and TEXFONTS.
-
- [21-Aug-86]
- Change fontlist.h, gendefs.h, and openfont.h to
- support a more general mechanism of font file
- name generation. fontlist() now returns a list
- of pointers to a series of possible font file
- names; the first null string in the list
- terminates it. The Unix and VAX VMS code
- sections in fontlist.h now generate names with
- the magnification both in the directory name as
- well as in the extension. This was prompted by a
- local need at Utah with some networked Unix
- workstations which have both flavors of font file
- storage.
-
- [21-Aug-86]
- Change handling of TeX \countn values to INT32,
- instead of UNSIGN32; roman-numeral pages come out
- with negative page numbers in PLAIN.TEX. This
- affects the declaration and use of tex_counters[]
- in dviinit.h, gblvars.h, prtpage.h, and tctos.h.
-
- [18-Aug-86]
- Allow negative page numbers on -o#:# switch to
- mean pages from end (-1 = last, -2 = next to
- last, etc.). sscanf() format change in option(),
- and introduce PAGENUMBER() macro in dvifile().
-
- [15-Aug-86]
- Conversion of the font magnification factor for
- *.*pxl files in fontfile.h to dots/inch for the
- *.*gf and *.*pk files forgot to round up. Thus,
- mag 1643 became 328 instead of 329. Because
- fontfile() gets a truncated magnification value,
- the rounding is non-trivial; comments in
- fontfile() describe what is necessary.
-